using System;
using System.Collections.Generic;
using System.Text;

namespace GC2.ExceptionHandler.Services
{
    public class ExceptionDAL
    {
        public string exDAL(string exOriginal)
        {
            try
            {
                string control = (exOriginal.ToString()).Remove(33);
                               
                StringBuilder sb = new StringBuilder();

                if (control == "System.Exception:  -- > Original ")
                {
                    sb.Append(exOriginal.ToString());
                    sb.Append(Environment.NewLine);
                }
                else
                {
                    sb.Append(" -- > Original Exception: Acceso a Datos");
                    sb.Append(Environment.NewLine);
                    sb.Append(exOriginal.ToString());
                    sb.Append(Environment.NewLine);
                }

                return sb.ToString();
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
    }
}
